﻿using System;
using System.Collections.Generic;
using System.Text;
using SH;

namespace MTS
{
	public interface ImtIPSServerCallback  : ImtCallback
{
		const int _classID = 6532;
		const string _interfaceName = "mtIPSServerCallback";
		const int ImtIPSServerStationInfo = 10;

		const int ImtIPSServerStationStatus = 11;
		const int ImtIPSServerGetIpsImageList = 12;

		const int ImtIPSServerReqIpsTask = 13;
		const int ImtIPSServerSubmitConclusion = 14;

		const int ImtIPSServerSubmitImageOperation = 15;
		const int ImtIPSServerReconComplete = 16;
		const int ImtIPSServerRecognizeComplete = 17;
		const int ImtIPSServerStorageComplete = 18;

		const int ImtIPSServerQueryHistoryImageInfo = 19;

		const int ImtIPSServerGetResourceString = 20;

		/// <summary>
		/// 站点请求连接
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerStationInfo", ImtIPSServerStationInfo)]
		public shErrorCode OnIpsStationInfo(string token, mtIpsStationInfo info) ;

		/// <summary>
		/// 站点上报状态
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerStationStatus", ImtIPSServerStationStatus)]
		public shErrorCode OnIpsStationStatus( string  token, mtIpsStationStatus req) ;

		/// <summary>
		/// 获取所有 待判图、待开检、待确认任务，判图服务内的。
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerGetIpsImageList", ImtIPSServerGetIpsImageList)]
		public shErrorCode OnGetIpsImageList( string  token, out mtIpsImageList imageList) ;

		/// <summary>
		/// 请求 待开检、待确认任务
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerReqIpsTask", ImtIPSServerReqIpsTask)]
		public shErrorCode OnReqIpsTask( string token, string prn, out mtIpsTask task) ;

		/// <summary>
		/// 站点提交判图、开检、确认结论
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerSubmitConclusion", ImtIPSServerSubmitConclusion)]
		public shErrorCode OnSubmitConclusion( string  token, mtIpsResult result) ;

		/// <summary>
		/// 站点提交图像操作
		/// </summary>
		/// <returns></returns>
		[mtFuncID("IPSServerSubmitImageOperation", ImtIPSServerSubmitImageOperation)]
		public shErrorCode OnSubmitImageOperation( string  token,  List<mtIpsImageOperation> vecOperation, out List<mtIpsImageOperationResult> vecResult);

		/// <summary>
		/// 重建完成
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerReconComplete", ImtIPSServerReconComplete)]
		public shErrorCode OnReconComplete(string token, mtReconComplete info) ;

		/// <summary>
		/// 识别完成
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerRecognizeComplete", ImtIPSServerRecognizeComplete)]
		public shErrorCode OnRecognizeComplete(string token, mtRecognizeComplete req) ;

		/// <summary>
		/// 存储完成
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerStorageComplete", ImtIPSServerStorageComplete)]
		public shErrorCode OnStorageComplete(string token, mtStorageComplete info) ;


		/// <summary>
		/// 存储服务通知手动保存结果
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerQueryHistoryImageInfo", ImtIPSServerQueryHistoryImageInfo)]
		public shErrorCode OnQueryHistoryImageInfo(string token, mtPicCriteria criteria, out List<mtPicinfo> vecIicinfos) ;

		/// <summary>
		/// 获取资源字符串
		/// </summary>
		/// <returns></returns>
		[mtFuncID("ImtIPSServerGetResourceString", ImtIPSServerGetResourceString)]
		public shErrorCode OnGetResourceString(string token, string lang, out string resources) ;

};

	public interface ImtIPSServer : Imt
	{

		/// <summary>
		/// 主动获取某个站点的站点状态
		/// </summary>
		/// <returns></returns>
		public shErrorCode GetIpsStationStatus(string token, out mtIpsStationStatus status);

		/// <summary>
		/// 判图服务下发判图任务，仅判图站支持
		/// </summary>
		/// <returns></returns>
		public shErrorCode SendIpsTask(string token, mtIpsTask task);

		/// <summary>
		///  获取相同类型的站点发送图像信息列表，根据imageList内的emIpsType自动选择。
		/// </summary>
		/// <returns></returns>
		public shErrorCode NotifyIpsImageList(mtIpsImageList imageList);


		/// <summary>
		/// 判图服务下发高危报警状态
		/// </summary>
		/// <returns></returns>
		public shErrorCode NotifyHighRiskState(mtIpsHighRiskState req);

		/// <summary>
		/// 判图服务通知确认站确认的结论
		/// </summary>
		/// <returns>
		/// </returns>
		public shErrorCode NotifyComfirmConclusion(mtIpsComfirmConclusion req);

		// to RCS
		public shErrorCode DeleteImage(mtDeleteImageDemand req, out mtDeleteImageReply rsp);

		public shErrorCode SaveImage(mtSaveImageRequest req, out mtSaveImageResponse rsp);

	}
}
